package com.squirrel.michale;

import java.util.ArrayList;
import java.util.List;

/**
 * @author guanhao 观浩
 * @version 1.0.0.0
 * @createTime 2023/2/19 7:52 AM
 * @company Michale Squirrel
 * @link
 * @description
 */
public class LeetCode1137 {

    public List<List<Integer>> findSolution(CustomFunction customfunction, int z) {

        List<List<Integer>> result = new ArrayList<>();
        for (int i = 1; i <= z; i++) {
            for (int j = 1; j <= z; j++) {
                if (z == customfunction.f(i, j)) {
                    List<Integer> answer = new ArrayList<>();
                    answer.add(i);
                    answer.add(j);
                    result.add(answer);
                }
            }
        }
        return result;
    }
}
